We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c875af0 commit 46bc6e5Copy full SHA for 46bc6e5
kitsune/products/models.py
@@ -170,7 +170,8 @@ def get_absolute_url(self, product_slug=None):
170
return reverse(named_url, kwargs=kwargs)
171
172
def save(self, *args, **kwargs):
173
- if self._topic_is_archived != self.is_archived and self.is_archived:
+ # Check if the is_archived field has changed
174
+ if self._topic_is_archived != self.is_archived:
175
for product in self.products.all():
176
cache_key = f"hierarchical_topics_{product.slug}"
177
cache.delete(cache_key)
0 commit comments